package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 订单使用券码记录
 * </p>
 *
 * @author Atlakyn
 * @since 2021-08-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_order_coupon_record")
public class OrderCouponRecord extends Model<OrderCouponRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单
     */
    private Integer orderId;

    /**
     * 用券用户
     */
    private Integer userId;

    @ApiModelProperty("券码ID")
    private Integer couponId;

    /**
     * 券码
     */
    private String couponCode;

    @ApiModelProperty("券码名称")
    private String couponTitle;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
